/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MybatisToolPanel.java
 *
 * Created on 2012-6-26, 22:01:34
 */
package com.piza.toolcenter.view;

import com.piza.toolcenter.operation.IWorkFlow;
import com.piza.toolcenter.operation.SessionContext;
import com.piza.toolcenter.view.mybatis.ConfirmPanel;
import com.piza.toolcenter.view.mybatis.DataBasePanel;
import com.piza.toolcenter.view.mybatis.TablesPanel;
import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author hong
 */
public class MybatisToolPanel extends javax.swing.JPanel {

    /** Creates new form MybatisToolPanel */
    public MybatisToolPanel() {
        initComponents();
        SessionContext context=new SessionContext();
        this.workSpacePanel.setContext(context);
        Map<Integer,IWorkFlow> workFlow=new HashMap<Integer, IWorkFlow>();
        workFlow.put(new Integer(1), new DataBasePanel());
        workFlow.put(new Integer(2), new TablesPanel());
        workFlow.put(new Integer(3), new ConfirmPanel());
        this.workSpacePanel.setWorkFlow(workFlow);
        this.workSpacePanel.start();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        workSpacePanel = new com.piza.toolcenter.view.WorkSpacePanel();

        setName("Form"); // NOI18N

        workSpacePanel.setName("workSpacePanel"); // NOI18N

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(workSpacePanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(workSpacePanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 499, Short.MAX_VALUE)
        );
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private com.piza.toolcenter.view.WorkSpacePanel workSpacePanel;
    // End of variables declaration//GEN-END:variables
}
